<style>
.ui-loading {
    width: 100px;
    height: 109px;
    display: inline-block;
    margin: 10px 0 0;
    vertical-align: middle;
    background: transparent url("");
    background-size: 100%;
}
.meal_num{
	width:100%;	
}
.meal_num .name{
	font-size:.8rem;
	color:#6a6a6a;
	padding-left:.5rem;
	margin:1.8rem 0 0 0;
}
.meal_num .combox{
	margin:1.8rem 0 0 0;
	padding:0 0 0 1.2rem;
	position:relative;
	height: 1rem;
}
.meal_num .p1,.meal_num .p2{color:#000;font-size:.28rem;}
.meal_num .dlt{
	padding:0 0 0 1rem;	
	height:1rem;
}
.meal_num .dlt dt{color: #000;font-size:0.7rem;float:left;width:3.6rem;line-height: 1rem;}
.meal_num .dlt dd{width: 70%;float: left;border-bottom:1px solid #d6d6d6;}
.meal_num .dlt .inpa{
	border:none;
	background: #f5f5f5;
	color:#000;
	font-size: .8rem;
	width: 100%;
	text-align:right;
}
.meal_num .dlt_1{margin:3rem 0 0 0;}
.meal_num .dlt_2{margin:2.5rem 0 0 0;}
.meal_num .dlt_2 .em1{padding-left: .7rem;}
.meal_num .num,.meal_num .checkB{position:absolute;top:-.4rem;right:1.2rem;}
.meal_num .num .min_g{background:url(../images/icon/min_g.png) no-repeat;}
.meal_num .num .min_b{background:url(../images/icon/min_b.png) no-repeat;}
.meal_num .num .add_b{background:url(../images/icon/add_b.png) no-repeat;}
.meal_num .checkB{background:url(../images/icon/add_b.png) no-repeat;}
.meal_num .num .min,.meal_num .num .add,.meal_num .checkB{width:1.2rem;height:1.2rem;background-size:contain;}
.meal_num .num .shu{width:1.8rem;height:1.2rem;line-height:1.2rem;text-align:center;}
.meal_num .pitch_w{background:url(../images/icon/unselect.png) no-repeat;}
.meal_num .pitch_x{background:url(../images/icon/select.png) no-repeat;}
.meal_num .pitch{width: 1.2rem;height: 1.2rem;background-size:contain;}
.meal_num .meal_or{
	width:100%;
	position: absolute;
	bottom:0;
	left:0;
	display:flex;
	display:-webkit-flex;
	justify-content: center;
	-webkit-justify-content: center;
	align-items:center;
}
.meal_num .meal_or dd{
	width:50%;
	height:2.2rem;
	line-height:2.2rem;
	text-align:center;
	font-size:0.7rem;
	color:#fff;		
}
.meal_num .meal_or .order-w{
	width:100%;
}
.meal_num .meal_num_a{
	width: 100%;
	height:1.2rem;
	line-height: 1.2rem;
	font-size: .8rem;
	text-align: left;
	text-indent:.5rem;
	color: #4a4a4a;
}
.meal_num .meal_num_er{
	margin:1.8rem 0 0 0;
}
.meal_num .meal_num_a .sp1{
	color:#9b9b9b;
	font-size:0.6rem;
	padding-left:0.12rem;
}
.meal_num_ula{
	width:16rem;
	margin:1rem auto 0.8rem;
	display: flex;
	display: -webkit-flex;
	flex-wrap:wrap;
	-webkit-flex-wrap:wrap;
  box-lines:multiple;
  -webkit-box-lines:multiple;
}
.meal_num_ula li{
	width: 2.2rem;
	height: 2.2rem;
	line-height: 2.2rem;
	text-align: center;
	margin-left:1.2rem;
	margin-bottom:.5rem;
	list-style:none
}
.meal_num_ula li:first-child,.meal_num_ula li:nth-child(6){
	margin-left: 0;
}
.meal_num_ula li a{
	display: block;
	width: 2.2rem;
	height: 2.2rem;
	color: #888;
	font-size: 1rem;
	border-radius:50%;
	border:0.5px solid #bfbfbf;
	background: #fff;
}
.meal_num_ula li a.active{
	background:#e50012;
	color:#fff;
	text-decoration: none;
	border-radius: 50%;
	border-color:#e50012;
}
.meal_num_ulb li,.meal_num_ulb li:nth-child(6){
	margin-left:0.5rem;
}
.fui-cell-remark .r-icon{display:inline-block;line-height: 1.3rem;height:1.3rem;width:1.3rem;border-radius:1.5rem;background:#f5f9cf;color:#e6251}

</style>
<div class='fui-page fui-page-current' style="background:#fff">
    <div class="fui-content" style="margin-bottom:2.2rem;background:#fff">
		<div class="fui-picture">
				<a style="display: block;">
					<img ng-src="{{tomedia(pagedata.pluginset.getqueuetop) || '../addons/jy_weidish_xibei/resource/images/getqueuetop.jpg'}}">
				</a>
		</div>
		<div class="fui-cell-group" style="margin-top:0">
				<div class="fui-cell">
					<div class="fui-cell-text">
						<div class="text" onclick="$('#showstores').modal();" style="font-size:0.75rem"><i class="icon icon-shoucang"></i> {{pagedata.store.title}} <i class="icon icon-more"></i></div>
						<div class="subtitle" style="font-size:0.55rem;padding-top:0.5rem">距离您{{pagedata.store.juli || 0}}km</div>
					</div>
					<div class="fui-cell-remark noremark">
						<span class="r-icon" href="tel:{{pagedata.store.tel || pagedata.store.mobile}}">
								<i class="icon icon-phone" style="padding:0.3rem;font-size:0.7rem"></i>
						</span>
						<span class="r-icon" style="margin-left:0.6rem" ng-click="pagedata.openLocation(pagedata.store);">
								<i class="icon icon-map" style="padding:0.3rem;font-size:0.7rem"></i>
						</span>
					</div>
				</div>
		</div>
		<div class="fixed-title" style="margin-bottom:0.8rem">
							 <span class="befirst spacing">
								 <span class="icon icon-icon-xiexiantiao" style="color:#efadb0"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#e26d71"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#d62f35"></span>
							 </span> 
							 <span class="title-text">请选择用餐人数</span> 
							 <span class="spacing">
								 <span class="icon icon-icon-xiexiantiao" style="color:#d62f35"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#e26d71"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#efadb0"></span>
							 </span>
		</div>
		<div class="slide_m">  	        			        		
			<div class="meal_num">
				<div class="new_person">
					<div class="meal_num_a">成人用餐人数</div>
					<ul class="meal_num_ula J-people-man">
						<li ng-repeat="v in pagedata.nums">
							<a href="javascript:;" ng-click="pagedata.item.num=v" ng-class="{'active':pagedata.item.num==v}">{{v}}</a>
						</li>
					</ul>
					<div class="meal_num_a meal_num_er">儿童用餐人数<span class="sp1">(8岁以下)</span></div>
					<ul class="meal_num_ula meal_num_ulb J-people-child">
						<li ng-repeat="v in pagedata.childnums">
							<a href="javascript:;" ng-click="pagedata.item.childnum=v" ng-class="{'active':pagedata.item.childnum==v}">{{v}}</a>
						</li>
					</ul>
					<dl class="meal_or"><dd class="pick J-but-takeout"></dd><dd class="order J-but-eatIn"></dd></dl>
				</div>
			</div>
        </div>
	</div>
	<div class="fui-navbar">				
		<div ng-if="pagedata.item.from!='queue' && pagedata.item.from!='table'" ng-click="access_json('jy_weidish_xibei/goodslist//self_type=0&id='+pagedata.item.store_id+'&usernum='+pagedata.item.num+'&childnum='+pagedata.item.childnum);" class="nav-item btn btn-gray" style="background:#373737;">
			到店打包
		</div>
		<div ng-if="pagedata.item.from!='queue'" ng-click="pagedata.gotogoodslist()" class="nav-item btn btn-gray" style="background:#e50012;">
			{{pagedata.item.from!='table'?'预点餐':'前往点餐'}}
		</div>
		<div ng-if="pagedata.item.from=='queue'" ng-click="post(pagedata.item,'jy_weidish_xibei/getqueue/get/');" class="nav-item btn btn-gray" style="background:#e50012;">
			立即取号
		</div>
	</div>
</div>
<!-- 关注公众号 -->
<div id="attention" ng-if="pagedata.showqrcode==1">
    <div class="attention-alert">
        <div class="attention-img"><img ng-src="{{tomedia(pagedata.shopset2.store_logo) || '../core/resource/images/nopic.jpg'}}" alt=""></div>
        <div class="attention-title">亲爱的上帝，为了您能正常的接收物流信息，请您先关注我们的公众号</div>
        <div class="attention-content">
            <div class="col-jy-2" style="text-align: center;"><img ng-src="{{tomedia(pagedata.shopset2.followqrcode) || '../core/resource/images/nopic.jpg'}}" alt=""style="width: 5.35rem"></div>
            <div class="col-jy-2" style="text-align: center;"><img src="../addons/jy_weishop/images/zhiwen.png" style="width: 3.3rem;margin:auto"></div>
            <p >长按指纹识别图中二维码</p>
        </div>
        <i class="icon icon-cuowu" ng-click="pagedata.showqrcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:46%"></i>
    </div>
</div>
<div id="showstores"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-list-group"  id="carrierInfo" style="margin: 0">
					<a class="fui-list"  ng-repeat="item in pagedata.storelist" href="javascript:;" ng-click="pagedata.selectstores($index);pagedata.selectstore = item;">
						<div class="fui-list-media">
							<i class="icon icon-map"></i>
						</div>
						<div class="fui-list-inner">
							<div class="subtitle" >
								<span style="overflow: hidden;display: inline-block;">线下门店 <span class="text">{{item.title}}</span></span>
							</div>
							<div class="text address">地址：<span style="color:red">{{item.pcd.province}}</span>({{item.pcd.district}} {{item.pcd.street}} {{item.address}})</div>
						</div>
						<div class="fui-list-angle">
							<div class="angle"></div>
						</div>
					</a>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
// 百度地图API功能
window.scope.location(function(re){
	re=re?re:{}
	var lat_lng = re.lat_lng?re.lat_lng:{};
	scope.get('jy_weishop/store.index/getlist/limit=8&lat='+lat_lng.lat+'&lng='+lat_lng.lng,function(res){
		if(res.list){
			scope.pagedata.storelist=res.list;
			if(!scope.pagedata.store.id){
				scope.pagedata.store=res.list[0]
				scope.pagedata.item.store_id=scope.pagedata.store.id;
			}
			scope.$evalAsync();
		}
	});
});
scope.pagedata.openLocation=function(item){
	wx.openLocation({
	latitude: item.lat_lng.lat, // 纬度，浮点数，范围为90 ~ -90
	longitude: item.lat_lng.lng, // 经度，浮点数，范围为180 ~ -180。
		name: item.province+item.city+item.district, // 位置名
		address: item.address, // 地址详情说明
		scale: 20, // 地图缩放级别,整形值,范围从1~28。默认为最大
		infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
		success:function(){
			//alert(1111);
		}
	});
}
scope.pagedata.selectstores=function(index){
	console.log('选择门店'+index);
	if(scope.pagedata.storelist){
		scope.pagedata.store = scope.pagedata.storelist[index];
		scope.pagedata.item.store_id=scope.pagedata.store.id;
		scope.$evalAsync();
	}
	$('#showstores').modal('hide');
}
scope.pagedata.gotogoodslist=function(){
	if(scope.pagedata.item.from=='table' && scope.pagedata.item.num<=0){
		scope.message('请选择成人用餐人数！','error');
	}
	scope.access_json('jy_weidish_xibei/goodslist//self_type=1&id='+scope.pagedata.item.store_id+'&usernum='+scope.pagedata.item.num+'&childnum='+scope.pagedata.item.childnum);
}
</script>